FSync & FFlush
#fsync is an OS operation - which forces whatever byte buffer to be written directly into the storage media (SSD/HD).
#fflush actually forces the buffer from the application level to the OS-level. But it does not guarantee that the data has been written into disk.
#fsync is way faster than #fflush due to its nature - one writes into memory before writing to the storage, and one forcefully writes stuff into storage.
https://stackoverflow.com/questions/4072878/i-o-concept-flush-vs-sync